﻿using System;
using System.Data;

using Framework;

namespace Enterprise.Admin.Handle
{
    /// <summary>
    /// 获取车间设备照片
    /// </summary>
    public partial class GetWorkShopDetailJson : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var id = Fq("id").SafeToInt();
            var workShopService = new WorkShopService();
            var row = workShopService.GetById(id);
            object result = new
                                {
                                    CoWorkShopId = row["CoWorkShopId"].SafeToInt(),
                                    CoName = row["CoName"].SafeToString(),
                                    CoNameEn = row["CoNameEn"].SafeToString(),
                                    CoDescription = row["CoDescription"].SafeToString(),
                                    CoDescriptionEn = row["CoDescriptionEn"].SafeToString(),
                                    CoNormalImage = row["CoNormalImage"].SafeToString(),
                                    CoSmallImage = row["CoSmallImage"].SafeToString(),
                                    CoBigImage = row["CoBigImage"].SafeToString(),
                                    CoSort = row["CoSort"].SafeToInt()
                                };
            Json(result);
        }
    }
}